from zope.interface import implements

import md5

from interfaces import IAgent, ISecondLifeAgent


class Agent(object):
    implements(IAgent)
    
    def __init__(self,username):
        self.username = username
        
        
class SecondLifeAgent(Agent):
    """model a second life agent"""
    
    implements(ISecondLifeAgent)
    
    def __init__(self, lastname, firstname, password):
        """initialize a secondlife agent"""
        self.username="%s %s" %(firstname,lastname)
        self.firstname=firstname
        self.lastname=lastname
        self.password=md5.new(password).hexdigest()
    